﻿<%@ Page Title="" Language="C#" MasterPageFile="../QTMusic.Master" AutoEventWireup="true" CodeBehind="Playing.aspx.cs" Inherits="QTMusic.Websites.Playing" %>

<%@ Register Src="../UserControls/RightPageOfSuggestion.ascx" TagName="RightPageSuggest" TagPrefix="rps" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <!-- listening content -->
    <div class="main_content_hdr">
        <div><b><%#songName %></b></div>
        <div style="font-size: 12px;">Trình bày: <%#artistName %> - Thể loại: <%#genreName %> </div>
    </div>

    <!-- Playing pane -->
    <div class="main_content_mediaplayer"> 
        <EMBED id="WindownMP" name="NtMusic" 
                pluginspage="http://www.microsoft.com/windows/windowsmedia/download/AllDownloads.aspx/" 
                src="<%#songPath%>" width="100%" height="100%" 
                type="application/x-mplayer2" playcount="1" enablecontextmenu="true" autostart="true" 
                visible="true" autosize="true" showstatusbar="true" showcontrols="true" enablepositioncontrols ="true" 
                sendplaystatechangeevents ="true" showaudiocontrols = "true" autorewind="true"/>
    </div>

    <!-- Statistic pane -->
    <div class="main_content_statistic">
        <div class="main_content_statistic_btngroup">
            <table width="320px">
                <tr>
                    <td style="width:25%">
                        <asp:Button CssClass = "button_modded" ID ="DownloadBtn" text="Tải về" 
                                    runat="server" onclick="DownloadBtn_Click"/>
                    </td>
                    <td style="width:25%">
                        <asp:UpdatePanel ID="ButtonLikePanel" runat="server">
                            <ContentTemplate>
                                <asp:Button CssClass = "button_modded" ID ="LikeBtn" Text="Thích" runat="server" 
                                    onclick="LikeBtn_Click" />
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </td>
                    <td style="width:25%">
                        <input type="button" class="button_modded" value="Thêm" runat="server" />
                    </td>
                    <td style="width:25%">
                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                            <asp:Button ID="ShareBtn" CssClass="button_modded" Text="Chia sẻ" 
                                runat="server" onclick="ShareBtn_Click"/>
                        </ContentTemplate>
                        </asp:UpdatePanel>
                    </td>
                </tr>
            </table>
        </div>
        <div class="main_content_statistic_viewlike">
            <div><b><%#viewCount %> Lượt nghe</b></div>
            <div><%#likeCount %> Thích</div>
        </div>
    </div>

    <!-- uploader words -->
    <div class="main_content_description">
        <div>Người đăng: <b><%#uperName %></b> <%#songTimeUp %></div>
        <div>
            <asp:TextBox CssClass = "txtbox_as_description"  ID ="DescriptionTextBox" 
                    runat="server" TextMode="MultiLine" ReadOnly="True" Width="100%"></asp:TextBox>
        </div>
    </div>

    <!-- Lyrics -->

    <asp:UpdatePanel ID="CommentPanel" runat="server">
            <ContentTemplate>
                <div style="width:90%; margin-left:5%">
                    <asp:Label ID="StatusLabel" Width = "100%" runat = "server" ForeColor="Red"></asp:Label>
                </div>
                <!-- make comment box -->
                <div class="main_content_makecomment">
                    <div><b>Bình luận</b></div>
                    <div class="main_content_makecomment_cmtbox">
                        <asp:TextBox ID ="CommentTextboxt" TextMode="MultiLine" runat="server" 
                            Width="100%" Height="60px"></asp:TextBox>
                    </div>
                    <div class="main_content_makecomment_btnpost">
                        <asp:Button CssClass = "button_modded" ID ="CommentBtn" text="Gửi bình luận" 
                                    runat="server" onclick="CommentBtn_Click" />
                    </div>
                </div>

                <!-- show comment -->
                <div class="main_content_commentholder">
                    <asp:Label ID ="LabelComment" runat="server" ></asp:Label>
                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                        Width="100%" AllowPaging="True" HorizontalAlign="Left" BorderColor="White" 
                        BorderStyle="None" BorderWidth="0px" 
                        onpageindexchanging="GridView1_PageIndexChanging">
                        <Columns>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <!-- Comment entry -->
                                    <div class="main_content_commentholder_cmtrow">
                                        <div class="main_content_commentholder_cmtrow_leftimg"> 
                                            <img src="../Resources/WebImages/file mp3.png" alt="../Resources/WebImages/file mp3.png" width="72px" height="72px" /> 
                                        </div>
                                        <div class="main_content_commentholder_cmtrow_midinfo">
                                            <br />
                                            <div style="font-size: 18px; font-weight:bold"><%# Eval("UserName")%></div>
                                            <div style="font-size: 12px;"><%# Eval("Time")%></div>
                                            <br />
                                            <div style="word-break: break-all"><%# Eval("Comment") %></div>
                                        </div>
                                    </div>  
                                                            
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                </div>
            </ContentTemplate>
    </asp:UpdatePanel>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <rps:RightPageSuggest runat="server" />
</asp:Content>